import React, { Component } from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import UpdateNav from '@/components/works/works-base/UpdateNav';
import Update from './login/Update';
import AllUpdate from './login/AllUpdate';
class Com extends Component {
  constructor (props) {
    super(props);
    this.state = {
      list:[
        {
          path: '/works/update',
          name: '我关注的更新'
        },
        {
          path: '/works/allupdate',
          name: '全部更新'
        },
      ]
    }
  }

  render () {
    return (
        <div className="sectionLogin">
        < UpdateNav list= {this.state.list} {...this.props}/>
          <Switch>
            <Route path = "/works/update" component = { Update } />
            <Route path = "/works/allupdate" component = { AllUpdate } />
          </Switch>
        </div>
    )
  }
}

export default Com;
